package com.yanmaohu.yulia.token;

/**
 * @author Bright Lee
 */
public final class Token {

    private final TokenType tokenType;
    private final int beginIndex;
    private final int endIndex;
    private final String content;

    public Token(TokenType tokenType, int beginIndex, int endIndex, String content) {
        this.tokenType = tokenType;
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.content = content;
    }

    public Token(TokenType tokenType, int beginIndex, int endIndex) {
        this(tokenType, beginIndex, endIndex, tokenType.getContent());
    }

    public TokenType getTokenType() {
        return tokenType;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public String getContent() {
        return content;
    }

    public boolean isEof() {
        return tokenType == TokenType.EOF;
    }

    public boolean isRegularIdentifier() {
        return tokenType == TokenType.REGULAR_IDENTIFIER;
    }

    public boolean isUnicodeDelimiterBody() {
        return tokenType == TokenType.REGULAR_IDENTIFIER;
    }

    public boolean isUnsignedIntegerLiteral() {
        return tokenType == TokenType.UNSIGNED_INTEGER_LITERAL;
    }

    public boolean isStringLiteral() {
        return tokenType == TokenType.STRING_LITERAL;
    }

    public boolean isDoubleQuote() {
        return tokenType == TokenType.DOUBLE_QUOTE;
    }

    public boolean isPercent() {
        return tokenType == TokenType.PERCENT;
    }

    public boolean isAmpersand() {
        return tokenType == TokenType.AMPERSAND;
    }

    public boolean isQuote() {
        return tokenType == TokenType.QUOTE;
    }

    public boolean isLeftParen() {
        return tokenType == TokenType.LEFT_PAREN;
    }

    public boolean isRightParen() {
        return tokenType == TokenType.RIGHT_PAREN;
    }

    public boolean isAsterisk() {
        return tokenType == TokenType.ASTERISK;
    }

    public boolean isPlusSign() {
        return tokenType == TokenType.PLUS_SIGN;
    }

    public boolean isComma() {
        return tokenType == TokenType.COMMA;
    }

    public boolean isMinusSign() {
        return tokenType == TokenType.MINUS_SIGN;
    }

    public boolean isPeriod() {
        return tokenType == TokenType.PERIOD;
    }

    public boolean isSolidus() {
        return tokenType == TokenType.SOLIDUS;
    }

    public boolean isColon() {
        return tokenType == TokenType.COLON;
    }

    public boolean isSemicolon() {
        return tokenType == TokenType.SEMICOLON;
    }

    public boolean isLessThanOperator() {
        return tokenType == TokenType.LESS_THAN_OPERATOR;
    }

    public boolean isLessThanOrEqualsOperator() {
        return tokenType == TokenType.LESS_THAN_OR_EQUALS_OPERATOR;
    }

    public boolean isNotEqualsOperator() {
        return tokenType == TokenType.NOT_EQUALS_OPERATOR;
    }

    public boolean isEqualsOperator() {
        return tokenType == TokenType.EQUALS_OPERATOR;
    }

    public boolean isGreaterThanOperator() {
        return tokenType == TokenType.GREATER_THAN_OPERATOR;
    }

    public boolean isGreaterThanOrEqualsOperator() {
        return tokenType == TokenType.GREATER_THAN_OR_EQUALS_OPERATOR;
    }

    public boolean isQuestionMark() {
        return tokenType == TokenType.QUESTION_MARK;
    }

    public boolean isLeftBracket() {
        return tokenType == TokenType.LEFT_BRACKET;
    }

    public boolean isLeftBracketTrigraph() {
        return tokenType == TokenType.LEFT_BRACKET_TRIGRAPH;
    }

    public boolean isRightBracket() {
        return tokenType == TokenType.RIGHT_BRACKET;
    }

    public boolean isRightBracketTrigraph() {
        return tokenType == TokenType.RIGHT_BRACKET_TRIGRAPH;
    }

    public boolean isCircumflex() {
        return tokenType == TokenType.CIRCUMFLEX;
    }

    public boolean isUnderscore() {
        return tokenType == TokenType.UNDERSCORE;
    }

    public boolean isVerticalBar() {
        return tokenType == TokenType.VERTICAL_BAR;
    }

    public boolean isConcatenationOperator() {
        return tokenType == TokenType.CONCATENATION_OPERATOR;
    }

    public boolean isLeftBrace() {
        return tokenType == TokenType.LEFT_BRACE;
    }

    public boolean isRightBrace() {
        return tokenType == TokenType.RIGHT_BRACE;
    }

    public boolean isAdd() {
        return tokenType == TokenType.ADD;
    }

    public boolean isAll() {
        return tokenType == TokenType.ALL;
    }

    public boolean isAllocate() {
        return tokenType == TokenType.ALLOCATE;
    }

    public boolean isAlter() {
        return tokenType == TokenType.ALTER;
    }

    public boolean isAnd() {
        return tokenType == TokenType.AND;
    }

    public boolean isAny() {
        return tokenType == TokenType.ANY;
    }

    public boolean isAre() {
        return tokenType == TokenType.ARE;
    }

    public boolean isArray() {
        return tokenType == TokenType.ARRAY;
    }

    public boolean isAs() {
        return tokenType == TokenType.AS;
    }

    public boolean isAsensitive() {
        return tokenType == TokenType.ASENSITIVE;
    }

    public boolean isAsymmetric() {
        return tokenType == TokenType.ASYMMETRIC;
    }

    public boolean isAt() {
        return tokenType == TokenType.AT;
    }

    public boolean isAtomic() {
        return tokenType == TokenType.ATOMIC;
    }

    public boolean isAuthorization() {
        return tokenType == TokenType.AUTHORIZATION;
    }

    public boolean isBegin() {
        return tokenType == TokenType.BEGIN;
    }

    public boolean isBetween() {
        return tokenType == TokenType.BETWEEN;
    }

    public boolean isBigint() {
        return tokenType == TokenType.BIGINT;
    }

    public boolean isBinary() {
        return tokenType == TokenType.BINARY;
    }

    public boolean isBlob() {
        return tokenType == TokenType.BLOB;
    }

    public boolean isBoolean() {
        return tokenType == TokenType.BOOLEAN;
    }

    public boolean isBoth() {
        return tokenType == TokenType.BOTH;
    }

    public boolean isBy() {
        return tokenType == TokenType.BY;
    }

    public boolean isCall() {
        return tokenType == TokenType.CALL;
    }

    public boolean isCalled() {
        return tokenType == TokenType.CALLED;
    }

    public boolean isCascaded() {
        return tokenType == TokenType.CASCADED;
    }

    public boolean isCase() {
        return tokenType == TokenType.CASE;
    }

    public boolean isCast() {
        return tokenType == TokenType.CAST;
    }

    public boolean isChar() {
        return tokenType == TokenType.CHAR;
    }

    public boolean isCharacter() {
        return tokenType == TokenType.CHARACTER;
    }

    public boolean isCheck() {
        return tokenType == TokenType.CHECK;
    }

    public boolean isClob() {
        return tokenType == TokenType.CLOB;
    }

    public boolean isClose() {
        return tokenType == TokenType.CLOSE;
    }

    public boolean isCollate() {
        return tokenType == TokenType.COLLATE;
    }

    public boolean isColumn() {
        return tokenType == TokenType.COLUMN;
    }

    public boolean isCommit() {
        return tokenType == TokenType.COMMIT;
    }

    public boolean isConnect() {
        return tokenType == TokenType.CONNECT;
    }

    public boolean isConstraint() {
        return tokenType == TokenType.CONSTRAINT;
    }

    public boolean isContinue() {
        return tokenType == TokenType.CONTINUE;
    }

    public boolean isCorresponding() {
        return tokenType == TokenType.CORRESPONDING;
    }

    public boolean isCreate() {
        return tokenType == TokenType.CREATE;
    }

    public boolean isCross() {
        return tokenType == TokenType.CROSS;
    }

    public boolean isCube() {
        return tokenType == TokenType.CUBE;
    }

    public boolean isCurrent() {
        return tokenType == TokenType.CURRENT;
    }

    public boolean isCurrentDate() {
        return tokenType == TokenType.CURRENT_DATE;
    }

    public boolean isCurrentDefaultTransformGroup() {
        return tokenType == TokenType.CURRENT_DEFAULT_TRANSFORM_GROUP;
    }

    public boolean isCurrentPath() {
        return tokenType == TokenType.CURRENT_PATH;
    }

    public boolean isCurrentRole() {
        return tokenType == TokenType.CURRENT_ROLE;
    }

    public boolean isCurrentTime() {
        return tokenType == TokenType.CURRENT_TIME;
    }

    public boolean isCurrentTimestamp() {
        return tokenType == TokenType.CURRENT_TIMESTAMP;
    }

    public boolean isCurrentTransformGroupForType() {
        return tokenType == TokenType.CURRENT_TRANSFORM_GROUP_FOR_TYPE;
    }

    public boolean isCurrentUser() {
        return tokenType == TokenType.CURRENT_USER;
    }

    public boolean isCursor() {
        return tokenType == TokenType.CURSOR;
    }

    public boolean isCycle() {
        return tokenType == TokenType.CYCLE;
    }

    public boolean isDate() {
        return tokenType == TokenType.DATE;
    }

    public boolean isDay() {
        return tokenType == TokenType.DAY;
    }

    public boolean isDeallocate() {
        return tokenType == TokenType.DEALLOCATE;
    }

    public boolean isDec() {
        return tokenType == TokenType.DEC;
    }

    public boolean isDecimal() {
        return tokenType == TokenType.DECIMAL;
    }

    public boolean isDeclare() {
        return tokenType == TokenType.DECLARE;
    }

    public boolean isDefault() {
        return tokenType == TokenType.DEFAULT;
    }

    public boolean isDelete() {
        return tokenType == TokenType.DELETE;
    }

    public boolean isDeref() {
        return tokenType == TokenType.DEREF;
    }

    public boolean isDescribe() {
        return tokenType == TokenType.DESCRIBE;
    }

    public boolean isDeterministic() {
        return tokenType == TokenType.DETERMINISTIC;
    }

    public boolean isDisconnect() {
        return tokenType == TokenType.DISCONNECT;
    }

    public boolean isDistinct() {
        return tokenType == TokenType.DISTINCT;
    }

    public boolean isDouble() {
        return tokenType == TokenType.DOUBLE;
    }

    public boolean isDrop() {
        return tokenType == TokenType.DROP;
    }

    public boolean isDynamic() {
        return tokenType == TokenType.DYNAMIC;
    }

    public boolean isEach() {
        return tokenType == TokenType.EACH;
    }

    public boolean isElement() {
        return tokenType == TokenType.ELEMENT;
    }

    public boolean isElse() {
        return tokenType == TokenType.ELSE;
    }

    public boolean isEnd() {
        return tokenType == TokenType.END;
    }

    public boolean isEndExec() {
        return tokenType == TokenType.END_EXEC;
    }

    public boolean isEscape() {
        return tokenType == TokenType.ESCAPE;
    }

    public boolean isExcept() {
        return tokenType == TokenType.EXCEPT;
    }

    public boolean isExec() {
        return tokenType == TokenType.EXEC;
    }

    public boolean isExecute() {
        return tokenType == TokenType.EXECUTE;
    }

    public boolean isExists() {
        return tokenType == TokenType.EXISTS;
    }

    public boolean isExternal() {
        return tokenType == TokenType.EXTERNAL;
    }

    public boolean isFalse() {
        return tokenType == TokenType.FALSE;
    }

    public boolean isFetch() {
        return tokenType == TokenType.FETCH;
    }

    public boolean isFilter() {
        return tokenType == TokenType.FILTER;
    }

    public boolean isFloat() {
        return tokenType == TokenType.FLOAT;
    }

    public boolean isFor() {
        return tokenType == TokenType.FOR;
    }

    public boolean isForeign() {
        return tokenType == TokenType.FOREIGN;
    }

    public boolean isFree() {
        return tokenType == TokenType.FREE;
    }

    public boolean isFrom() {
        return tokenType == TokenType.FROM;
    }

    public boolean isFull() {
        return tokenType == TokenType.FULL;
    }

    public boolean isFunction() {
        return tokenType == TokenType.FUNCTION;
    }

    public boolean isGet() {
        return tokenType == TokenType.GET;
    }

    public boolean isGlobal() {
        return tokenType == TokenType.GLOBAL;
    }

    public boolean isGrant() {
        return tokenType == TokenType.GRANT;
    }

    public boolean isGroup() {
        return tokenType == TokenType.GROUP;
    }

    public boolean isGrouping() {
        return tokenType == TokenType.GROUPING;
    }

    public boolean isHaving() {
        return tokenType == TokenType.HAVING;
    }

    public boolean isHold() {
        return tokenType == TokenType.HOLD;
    }

    public boolean isHour() {
        return tokenType == TokenType.HOUR;
    }

    public boolean isIdentity() {
        return tokenType == TokenType.IDENTITY;
    }

    public boolean isImmediate() {
        return tokenType == TokenType.IMMEDIATE;
    }

    public boolean isIn() {
        return tokenType == TokenType.IN;
    }

    public boolean isIndicator() {
        return tokenType == TokenType.INDICATOR;
    }

    public boolean isInner() {
        return tokenType == TokenType.INNER;
    }

    public boolean isInout() {
        return tokenType == TokenType.INOUT;
    }

    public boolean isInput() {
        return tokenType == TokenType.INPUT;
    }

    public boolean isInsensitive() {
        return tokenType == TokenType.INSENSITIVE;
    }

    public boolean isInsert() {
        return tokenType == TokenType.INSERT;
    }

    public boolean isInt() {
        return tokenType == TokenType.INT;
    }

    public boolean isInteger() {
        return tokenType == TokenType.INTEGER;
    }

    public boolean isIntersect() {
        return tokenType == TokenType.INTERSECT;
    }

    public boolean isInterval() {
        return tokenType == TokenType.INTERVAL;
    }

    public boolean isInto() {
        return tokenType == TokenType.INTO;
    }

    public boolean isIs() {
        return tokenType == TokenType.IS;
    }

    public boolean isIsolation() {
        return tokenType == TokenType.ISOLATION;
    }

    public boolean isJoin() {
        return tokenType == TokenType.JOIN;
    }

    public boolean isLanguage() {
        return tokenType == TokenType.LANGUAGE;
    }

    public boolean isLarge() {
        return tokenType == TokenType.LARGE;
    }

    public boolean isLateral() {
        return tokenType == TokenType.LATERAL;
    }

    public boolean isLeading() {
        return tokenType == TokenType.LEADING;
    }

    public boolean isLeft() {
        return tokenType == TokenType.LEFT;
    }

    public boolean isLike() {
        return tokenType == TokenType.LIKE;
    }

    public boolean isLocal() {
        return tokenType == TokenType.LOCAL;
    }

    public boolean isLocaltime() {
        return tokenType == TokenType.LOCALTIME;
    }

    public boolean isLocaltimestamp() {
        return tokenType == TokenType.LOCALTIMESTAMP;
    }

    public boolean isMatch() {
        return tokenType == TokenType.MATCH;
    }

    public boolean isMember() {
        return tokenType == TokenType.MEMBER;
    }

    public boolean isMerge() {
        return tokenType == TokenType.MERGE;
    }

    public boolean isMethod() {
        return tokenType == TokenType.METHOD;
    }

    public boolean isMinute() {
        return tokenType == TokenType.MINUTE;
    }

    public boolean isModifies() {
        return tokenType == TokenType.MODIFIES;
    }

    public boolean isModule() {
        return tokenType == TokenType.MODULE;
    }

    public boolean isMonth() {
        return tokenType == TokenType.MONTH;
    }

    public boolean isMultiset() {
        return tokenType == TokenType.MULTISET;
    }

    public boolean isNational() {
        return tokenType == TokenType.NATIONAL;
    }

    public boolean isNatural() {
        return tokenType == TokenType.NATURAL;
    }

    public boolean isNchar() {
        return tokenType == TokenType.NCHAR;
    }

    public boolean isNclob() {
        return tokenType == TokenType.NCLOB;
    }

    public boolean isNew() {
        return tokenType == TokenType.NEW;
    }

    public boolean isNo() {
        return tokenType == TokenType.NO;
    }

    public boolean isNone() {
        return tokenType == TokenType.NONE;
    }

    public boolean isNot() {
        return tokenType == TokenType.NOT;
    }

    public boolean isNull() {
        return tokenType == TokenType.NULL;
    }

    public boolean isNumeric() {
        return tokenType == TokenType.NUMERIC;
    }

    public boolean isOf() {
        return tokenType == TokenType.OF;
    }

    public boolean isOld() {
        return tokenType == TokenType.OLD;
    }

    public boolean isOn() {
        return tokenType == TokenType.ON;
    }

    public boolean isOnly() {
        return tokenType == TokenType.ONLY;
    }

    public boolean isOpen() {
        return tokenType == TokenType.OPEN;
    }

    public boolean isOr() {
        return tokenType == TokenType.OR;
    }

    public boolean isOrder() {
        return tokenType == TokenType.ORDER;
    }

    public boolean isOut() {
        return tokenType == TokenType.OUT;
    }

    public boolean isOuter() {
        return tokenType == TokenType.OUTER;
    }

    public boolean isOutput() {
        return tokenType == TokenType.OUTPUT;
    }

    public boolean isOver() {
        return tokenType == TokenType.OVER;
    }

    public boolean isOverlaps() {
        return tokenType == TokenType.OVERLAPS;
    }

    public boolean isParameter() {
        return tokenType == TokenType.PARAMETER;
    }

    public boolean isPartition() {
        return tokenType == TokenType.PARTITION;
    }

    public boolean isPrecision() {
        return tokenType == TokenType.PRECISION;
    }

    public boolean isPrepare() {
        return tokenType == TokenType.PREPARE;
    }

    public boolean isPrimary() {
        return tokenType == TokenType.PRIMARY;
    }

    public boolean isProcedure() {
        return tokenType == TokenType.PROCEDURE;
    }

    public boolean isRange() {
        return tokenType == TokenType.RANGE;
    }

    public boolean isReads() {
        return tokenType == TokenType.READS;
    }

    public boolean isReal() {
        return tokenType == TokenType.REAL;
    }

    public boolean isRecursive() {
        return tokenType == TokenType.RECURSIVE;
    }

    public boolean isRef() {
        return tokenType == TokenType.REF;
    }

    public boolean isReferences() {
        return tokenType == TokenType.REFERENCES;
    }

    public boolean isReferencing() {
        return tokenType == TokenType.REFERENCING;
    }

    public boolean isRelease() {
        return tokenType == TokenType.RELEASE;
    }

    public boolean isReturn() {
        return tokenType == TokenType.RETURN;
    }

    public boolean isReturns() {
        return tokenType == TokenType.RETURNS;
    }

    public boolean isRevoke() {
        return tokenType == TokenType.REVOKE;
    }

    public boolean isRight() {
        return tokenType == TokenType.RIGHT;
    }

    public boolean isRollback() {
        return tokenType == TokenType.ROLLBACK;
    }

    public boolean isRollup() {
        return tokenType == TokenType.ROLLUP;
    }

    public boolean isRow() {
        return tokenType == TokenType.ROW;
    }

    public boolean isRows() {
        return tokenType == TokenType.ROWS;
    }

    public boolean isSavepoint() {
        return tokenType == TokenType.SAVEPOINT;
    }

    public boolean isScroll() {
        return tokenType == TokenType.SCROLL;
    }

    public boolean isSearch() {
        return tokenType == TokenType.SEARCH;
    }

    public boolean isSecond() {
        return tokenType == TokenType.SECOND;
    }

    public boolean isSelect() {
        return tokenType == TokenType.SELECT;
    }

    public boolean isSensitive() {
        return tokenType == TokenType.SENSITIVE;
    }

    public boolean isSessionUser() {
        return tokenType == TokenType.SESSION_USER;
    }

    public boolean isSet() {
        return tokenType == TokenType.SET;
    }

    public boolean isSimilar() {
        return tokenType == TokenType.SIMILAR;
    }

    public boolean isSmallint() {
        return tokenType == TokenType.SMALLINT;
    }

    public boolean isSome() {
        return tokenType == TokenType.SOME;
    }

    public boolean isSpecific() {
        return tokenType == TokenType.SPECIFIC;
    }

    public boolean isSpecifictype() {
        return tokenType == TokenType.SPECIFICTYPE;
    }

    public boolean isSql() {
        return tokenType == TokenType.SQL;
    }

    public boolean isSqlexception() {
        return tokenType == TokenType.SQLEXCEPTION;
    }

    public boolean isSqlstate() {
        return tokenType == TokenType.SQLSTATE;
    }

    public boolean isSqlwarning() {
        return tokenType == TokenType.SQLWARNING;
    }

    public boolean isStart() {
        return tokenType == TokenType.START;
    }

    public boolean isStatic() {
        return tokenType == TokenType.STATIC;
    }

    public boolean isSubmultiset() {
        return tokenType == TokenType.SUBMULTISET;
    }

    public boolean isSymmetric() {
        return tokenType == TokenType.SYMMETRIC;
    }

    public boolean isSystem() {
        return tokenType == TokenType.SYSTEM;
    }

    public boolean isSystemUser() {
        return tokenType == TokenType.SYSTEM_USER;
    }

    public boolean isTable() {
        return tokenType == TokenType.TABLE;
    }

    public boolean isThen() {
        return tokenType == TokenType.THEN;
    }

    public boolean isTime() {
        return tokenType == TokenType.TIME;
    }

    public boolean isTimestamp() {
        return tokenType == TokenType.TIMESTAMP;
    }

    public boolean isTimezoneHour() {
        return tokenType == TokenType.TIMEZONE_HOUR;
    }

    public boolean isTimezoneMinute() {
        return tokenType == TokenType.TIMEZONE_MINUTE;
    }

    public boolean isTo() {
        return tokenType == TokenType.TO;
    }

    public boolean isTrailing() {
        return tokenType == TokenType.TRAILING;
    }

    public boolean isTranslation() {
        return tokenType == TokenType.TRANSLATION;
    }

    public boolean isTreat() {
        return tokenType == TokenType.TREAT;
    }

    public boolean isTrigger() {
        return tokenType == TokenType.TRIGGER;
    }

    public boolean isTrue() {
        return tokenType == TokenType.TRUE;
    }

    public boolean isUnion() {
        return tokenType == TokenType.UNION;
    }

    public boolean isUnique() {
        return tokenType == TokenType.UNIQUE;
    }

    public boolean isUnknown() {
        return tokenType == TokenType.UNKNOWN;
    }

    public boolean isUnnest() {
        return tokenType == TokenType.UNNEST;
    }

    public boolean isUpdate() {
        return tokenType == TokenType.UPDATE;
    }

    public boolean isUser() {
        return tokenType == TokenType.USER;
    }

    public boolean isUsing() {
        return tokenType == TokenType.USING;
    }

    public boolean isValue() {
        return tokenType == TokenType.VALUE;
    }

    public boolean isValues() {
        return tokenType == TokenType.VALUES;
    }

    public boolean isVarchar() {
        return tokenType == TokenType.VARCHAR;
    }

    public boolean isVarying() {
        return tokenType == TokenType.VARYING;
    }

    public boolean isWhen() {
        return tokenType == TokenType.WHEN;
    }

    public boolean isWhenever() {
        return tokenType == TokenType.WHENEVER;
    }

    public boolean isWhere() {
        return tokenType == TokenType.WHERE;
    }

    public boolean isWindow() {
        return tokenType == TokenType.WINDOW;
    }

    public boolean isWith() {
        return tokenType == TokenType.WITH;
    }

    public boolean isWithin() {
        return tokenType == TokenType.WITHIN;
    }

    public boolean isWithout() {
        return tokenType == TokenType.WITHOUT;
    }

    public boolean isYear() {
        return tokenType == TokenType.YEAR;
    }

}
